Skip to content

Conversation

@copybara-service
Copy link

Add OptimizationContext to analysis passes and visitors.

This change modifies several analysis and pass implementations to accept and utilize an OptimizationContext. This allows them to leverage pre-computed topological sorts from the context, avoiding redundant computations.

Specifically:

  • DataflowVisitor and BitProvenanceAnalysis are updated to use OptimizationContext for topological sorts.
  • PredicateDominatorAnalysis is updated to use OptimizationContext for reverse topological sorts.
  • DataflowSimplificationPass and SelectSimplificationPass now pass the OptimizationContext to the analyses they use.
  • Benchmarks for PredicateDominatorAnalysis are updated to test with and without sharing the OptimizationContext.

@copybara-service copybara-service bot force-pushed the test_861883547 branch 2 times, most recently from 23b92ab to c7a2f5d Compare January 27, 2026 22:50
This change modifies several analysis and pass implementations to accept and utilize an OptimizationContext. This allows them to leverage pre-computed topological sorts from the context, avoiding redundant computations.

Specifically:
-   DataflowVisitor and BitProvenanceAnalysis are updated to use `OptimizationContext` for topological sorts.
-   PredicateDominatorAnalysis is updated to use `OptimizationContext` for reverse topological sorts.
-   DataflowSimplificationPass and SelectSimplificationPass now pass the `OptimizationContext` to the analyses they use.
-   Benchmarks for PredicateDominatorAnalysis are updated to test with and without sharing the `OptimizationContext`.
PiperOrigin-RevId: 861883547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant